package com.shop.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shop.entity.MerchantGoods;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * (MerchantGoods)表数据库访问层
 *
 * @author makejava
 * @since 2020-11-21 09:48:30
 */
@Mapper
public interface MerchantGoodsMapper extends BaseMapper<MerchantGoods> {

    List<MerchantGoods> getGoodsListByCategoryId(int id);

    //查询商品列表
    List<MerchantGoods> getGoodsList(@Param("categoryId") Integer categoryId, @Param("merchantId")Integer merchantId);
    //检索
    List<MerchantGoods> superSearch(String superSearchKeyWord);
    //修改商品
    int updateByGoodsId(MerchantGoods merchantGoods);
    //添加商品
    int insertGoods(MerchantGoods merchantGoods);
    //根据类别查商品
    List<MerchantGoods> getCategoryIdByMerchant(Integer categoryId, Integer merchantId);
}
